#pragma once

#include "../Shas/Shas/Interfaces/IShader.h"
#include "../ScreenMask/ScreenMask.h"


class Filter
{
private:
	IShader* shader;
	ScreenMask screenMask;
	IDirect3DDevice9* device;

public:
	Filter(IDirect3DDevice9* device, IShader* shader);

	void Render(const std::string& technique = "", int downsampling=1 );
};


class FilterManager
{
private:
	IDirect3DDevice9* device;
	IShaderSystem* shaderSystem;
	std::string pluginPath;

public:
	FilterManager(IDirect3DDevice9* device, const std::wstring& pluginPath);
	virtual ~FilterManager();

	Filter* LoadFilter(const std::string& filename);
	void AddParameter(const std::string& name, IDirect3DTexture9* value);
	void AddParameter(const std::string& name, float* value);
	void AddParameter(const std::string& name, D3DXVECTOR4* value);
	void ClearParameters();
};
